//
//  SluggedString.h
//  Oos4ios
//
//  Created by Pablo Gonzalez on 2/28/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import <oos4ios/Model/BoundaryBox.h>

@implementation BoundaryBox

@synthesize minLatitude = mMinLatitude;
@synthesize minLongitude = mMinLongitude;
@synthesize maxLatitude = mMaxLatitude;
@synthesize maxLongitude = mMaxLongitude;

- (NSString *) description
{
	return [NSString stringWithFormat:@"%@,%@,%@,%@", 
			mMinLongitude, mMinLatitude, mMaxLongitude, mMaxLatitude];
}

- (NSInteger) getLatSpanE6
{
	return abs([mMaxLatitude intValue] - [mMinLatitude intValue]) * 1e6;
}

- (NSInteger) getLonSpanE6
{
	return abs([mMaxLongitude intValue] - [mMinLongitude intValue]) * 1e6;
}

- (void)dealloc
{
    self.minLatitude = nil;
    self.maxLatitude = nil;
    self.minLongitude = nil;
    self.maxLongitude = nil;
    [super dealloc];
}

@end
